package com.icangya.service.impl;

import com.icangya.DAO.IGainRecordDAO;
import com.icangya.domain.GainRecord;
import com.icangya.service.IGainRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

@Service("GainRecordServiceImpl")
public class GainRecordServiceImpl implements IGainRecordService{
    @Autowired
    private IGainRecordDAO iGainRecordDAO;

    @Override
    public GainRecord getGainByTimeSlot(Timestamp startTime, Timestamp endTime) {
        return iGainRecordDAO.getGainTime(startTime,endTime);

    }
    @Override
    public List<GainRecord> getAllGain(int startpage) {
        return iGainRecordDAO.getGainAll(startpage);
    }

//练手用
//    @Override
//    public Serializable saveOne() {
//        return iGainRecordDAO.saveNewOne();
//    }
}
